{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters static %}
{% block pagehead %}
    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}RFC status changes{% endblock %}
{% block content %}
    {% origin %}
    <h1>RFC status changes</h1>
    {% if user|has_role:"Area Director,Secretariat" %}
        <p>
            <a class="btn btn-primary my-3"
               href="{% url 'ietf.doc.views_status_change.start_rfc_status_change' %}">
                New RFC status change
            </a>
        </p>
    {% endif %}
    {% regroup docs by get_state as state_groups %}
    <table class="table table-striped table-sm tablesorter">
        <thead>
            <tr>
                <th scope="col" data-sort="document">Document</th>
                <th scope="col" data-sort="title">Title</th>
            </tr>
        </thead>
        {% for state in state_groups %}
            <tbody>
                <tr class="table-info">
                    <th scope="col" colspan="2">{{ state.grouper }}</th>
                </tr>
            </tbody>
            <tbody>
                {% for doc in state.list %}
                    <tr>
                        <td>{{ doc.displayname_with_link|safe }}</td>
                        <td>
                            <b>{{ doc.title }}</b>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        {% endfor %}
    </table>
{% endblock %}
{% block js %}
    <script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}